<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const obj = {
        bingeWatch: 0,
        cat: "喜剧,科幻,动画",
        civilPubSt: 0,
        comingTitle: "8月16日 周六",
        desc: "主演:山姆·洛克威尔,马克·马龙,奥卡菲娜",
        dir: "彼埃尔·佩里菲尔,JP Sans",
        dur: 104,
        effectShowNum: 0,
        followst: 0,
        fra: "美国,中国香港",
        frt: "2025-08-01,2025-07-31",
        globalReleased: true,
        haspromotionTag: false,
        headLineShow: false,
        id: 1523743,
        img: "https://p0.pipi.cn/mediaplus/friday_image_fe/0fa334bf49414d6cb47f07e2080d31bfd3b54.jpeg?imageMogr2/quality/80",
        isRevival: false,
        late: false,
        localPubSt: 0,
        mark: false,
        mk: 9.5,
        movieType: 0,
        nm: "坏蛋联盟2",
        pn: 22,
        preSale: 0,
        preShow: false,
        proScore: 0.0,
        proScoreNum: 0,
        pubDate: 1755273600000,
        pubDesc: "2025-08-16 09:00中国大陆上映",
        pubShowNum: 0,
        recentShowDate: 1758556800000,
        recentShowNum: 0,
        rt: "2025-08-16",
        sc: 9.5,
        scm: "",
        scoreLabel: "猫眼购票评分",
        showCinemaNum: 36,
        showInfo: "今天36家影院放映52场",
        showNum: 52,
        showStateButton: {
          color: "#F03D37",
          content: "购票",
          contentImg:
            "https://p0.pipi.cn/mediaplus/fe_rock_web/0fa334bfbf80515be7d8a1291733a206d4bd3.png?imageMogr2/thumbnail/2500x2500%3E",
          onlyPreShow: false,
        },
        showTimeInfo: "2025-08-16上映",
        showst: 3,
        snum: 27485,
        src: "美国",
        star: "山姆·洛克威尔,马克·马龙,奥卡菲娜",
        totalShowNum: 144,
        ver: "3D",
        videoId: 514977,
        videoName: "合家欢必看《坏蛋联盟2》今日上映解压一夏",
        videourl:
          "https://vod.pipi.cn/fec9203cvodtransbj1251246104/dcbf44245145403695442470880/v.f42905.mp4",
        vnum: 10,
        vodPlay: false,
        wish: 297627,
        wishst: 0,
      };
    
      // JSON.stringify()方法可以将对象和数组转成字符串格式
      const str = JSON.stringify(obj);
      console.log(str);
      
      // JSON.parse()用于将字符串转成对象或者数组
      const obj2 = JSON.parse(str);
      console.log(obj2);
      
    </script>
  </body>
</html>
